
#ifndef UTILS_THREAD_H
#define UTILS_THREAD_H

#if defined(UTILS_ALL_BOOST)
#if !defined(UTILS_THREAD_BOOST) && !defined(UTILS_THREAD_STANDARD) 
#define UTILS_THREAD_BOOST
#endif
#elif defined(UTILS_ALL_STANDARD)
#if !defined(UTILS_THREAD_BOOST) && !defined(UTILS_THREAD_STANDARD) 
#define UTILS_THREAD_STANDARD
#endif
#endif

#if defined(UTILS_THREAD_BOOST)
#include <boost/thread.hpp>
namespace utils {
  using ::boost::thread;
  namespace this_thread = ::boost::this_thread;

  using ::boost::defer_lock;
  using ::boost::try_to_lock;
  using ::boost::adopt_lock;
  
  using ::boost::mutex;
  using ::boost::timed_mutex;
  using ::boost::recursive_mutex;
  using ::boost::recursive_timed_mutex;

  using ::boost::lock_guard;
  using ::boost::unique_lock;

  using ::boost::condition_variable;
  using ::boost::condition_variable_any;
  typedef ::boost::condition_variable_any condition;
}
#elif defined(UTILS_THREAD_STANDARD)
#include <thread>
namespace utils {
  using std::thread;
  namespace this_thread = std::this_thread;

  using std::defer_lock;
  using std::try_to_lock;
  using std::adopt_lock;
  
  using std::mutex;
  using std::timed_mutex;
  using std::recursive_mutex;
  using std::recursive_timed_mutex;

  using std::lock_guard;
  using std::unique_lock;

  using std::condition_variable;
  using std::condition_variable_any;
  typedef std::condition_variable_any condition;
}
#endif

#endif // UTILS_THREAD_H

